import request from '@/utils/request'

// 查询产出商品列表
export function allGoods (query) {
  return request({
    url: '/disposal/goods/all',
    method: 'get',
    params: query
  })
}

// 查询产出商品列表
export function listGoods (query) {
  return request({
    url: '/disposal/goods/list',
    method: 'get',
    params: query
  })
}

// 查询产出商品详细
export function getGoods (id) {
  return request({
    url: '/disposal/goods/' + id,
    method: 'get'
  })
}

// 新增产出商品
export function addGoods (data) {
  return request({
    url: '/disposal/goods',
    method: 'post',
    data: data
  })
}

// 修改产出商品
export function updateGoods (data) {
  return request({
    url: '/disposal/goods',
    method: 'put',
    data: data
  })
}

// 删除产出商品
export function delGoods (id) {
  return request({
    url: '/disposal/goods/' + id,
    method: 'delete'
  })
}
